package com.sgb.kjwl.view.ui.adapter.category;

import android.content.Context;
import androidx.recyclerview.widget.RecyclerView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.swgk.core.view.entity.MenuEntity;
import com.swgk.core.recyclerview.secondary.DescHolder;
import com.swgk.core.recyclerview.secondary.HeaderHolder;
import com.swgk.core.recyclerview.secondary.SectionedRecyclerViewAdapter;

import java.util.List;

public class CategoryRightAdapter extends SectionedRecyclerViewAdapter<MenuEntity, MenuEntity, HeaderHolder, DescHolder, RecyclerView.ViewHolder> {

    public CategoryRightAdapter(Context context, List<MenuEntity> datas) {
        super(context, R.layout.item_category_right_header, R.layout.item_category_right_desc, datas);
    }

    @Override
    protected void onBindSectionHeaderViewHolder(HeaderHolder holder, int section, MenuEntity secondaryEntity) {
        holder.setBinding(BR.viewModel, secondaryEntity);
    }

    @Override
    protected void onBindSectionFooterViewHolder(RecyclerView.ViewHolder holder, int section) {

    }

    @Override
    protected void onBindItemViewHolder(DescHolder holder, int section, int position, MenuEntity entity) {
        holder.setBinding(BR.viewModel, entity);
    }
}